<template>
    <div>
         <tree-item 
        v-for="(item, index) in data" 
        :key="index"
        :data="item" 
        :props="props"
        @answer='answer'
         ></tree-item>
    </div>
</template>
<script>
import treeItem from './treeItem'
export default {
    components: {
        treeItem
    },
    props: {
        data: {
            type: Array,
            default: function(){
                return []
            }
        },
        props: Object
    },
    methods: {
        answer(item){
            this.$emit('answer', item)
        }
    }
}
</script>
<style scoped>

</style>